<?php
/**
 * @date        <!-- phpDesigner :: Timestamp [08-07-2010 01:10:09] -->
 * @filesource  class.user.php
 * @package     WebCms
 * @copyright	Copyright (C) 2010
 * @author      Sérgio 'Horizak' Alves
 */

// Sem acesso directo
defined('_WEXEC') or die('Restricted access');

/**
 * Content component
 *
 */
class Component_User extends Component {
  /**
   * Função construtora
   * 
   */
  function __construct() {
    $this->name = 'User';
    $this->patch = dirname(__file__).DS;
    parent::__construct();
  }

  /**
   * Mostra a pagina de login ou os dados do utilizador
   * 
   */
  function userPage() {
    global $cms;

    if($cms->obj['user']->logged()) $cms->obj['component']->show('component.user.tpl');
    else  $cms->obj['component']->show('component.user.login.tpl');

  }
}
?>